<?php
session_start();
if(!isset($_SESSION['user'])){
	echo  "请你先登陆<a href=\"/index.php\">login</a>";
	exit();
}else{
	$at=$_SESSION['user'];
	require('../config.php');
	mysql_select_db(SAE_MYSQL_DB,$conn) or die("数据库".SAE_MYSQL_DB."连接失败!");
	$sqlstr="SELECT * FROM dcsmember WHERE email='$at'";
	$result=mysql_query($sqlstr,$conn);
	if(!$result){
	echo "资料获取失败";
	exit;
	}else{
		for($rows=0;$rows<1;$rows++){
			$sname=mysql_result($result,$rows,"name");
			$semail=mysql_result($result,$rows,"email");
			$stime=mysql_result($result,$rows,"time");
			$sjifen=mysql_result($result,$rows,"jifen");
			$spho=mysql_result($result,$rows,"phonenumber");
		}
	}
}

if($_GET['ac']=="out"){
	$_SESSION['user']='';
	$_SESSION['uid']='';
	session_destroy(); 
	mysql_close($conn);
	echo "<script>window.location.href='/index.php';</script>";
}
?>
<div data-role="page">

<div data-role="header" data-position="inline" data-theme="c" class="ui-header ui-bar-c" role="banner">
			<a href="/home.php" data-icon="home" iconpos="notext" class="ui-btn-left ui-btn ui-btn-up-c ui-btn-icon-left ui-btn-corner-all ui-shadow" data-theme="c"><span class="ui-btn-inner ui-btn-corner-all" aria-hidden="true"><span class="ui-btn-text">返回主页</span><span class="ui-icon ui-icon-home ui-icon-shadow"></span></span></a>
			<h1 class="ui-title" tabindex="0" role="heading" aria-level="1">查看记录</h1>
			<a href="/user/inout.html" data-icon="arrow-r" data-iconpos="right" data-theme="b" class="ui-btn-right ui-btn ui-btn-up-b ui-btn-icon-right ui-btn-corner-all ui-shadow"><span class="ui-btn-inner ui-btn-corner-all" aria-hidden="true"><span class="ui-btn-text">添加记录</span><span class="ui-icon ui-icon-arrow-r ui-icon-shadow"></span></span></a>
	
</div><!-- /header -->
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li>注册EMAIL：<?php echo $semail; ?></li>
<li>注册名称：<?php echo $sname; ?> </li>
<li>注册时间：<?php echo $stime; ?></li>
<li>积分：<?php echo $sjifen; ?></li>
<li>手机号：<?php echo $spho; ?></li>
</ul>
</div>

<div data-role="footer">
<h1>我爱宝宝@香柱元</h1>
</div>
</div>
